/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __F30B22F1_163A_42F4_AB3D_6B1074794E58__
#define __F30B22F1_163A_42F4_AB3D_6B1074794E58__

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace xos_common
{

    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    // 
    // md5_impl
    // 
    class i_md5 : public xos::i_release
    {
    protected:
        virtual ~i_md5(){}

    public:
        virtual int cal_update( const char * cal_buf, unsigned int uLen ) = 0;
        virtual int get_result( unsigned char md5_result[16] ) = 0;
        virtual int get_result_string( char * lpszMd5, int nLen ) = 0;
        virtual int get_hash2byte( int * pnHash2byte ) = 0;
        virtual int clear() = 0;
    };

} // xos_common

#endif // __F30B22F1_163A_42F4_AB3D_6B1074794E58__
